﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json;

public partial class data_GetPictureByCategory : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        IList<Picture> pictureList=null;
        if (Request["Category"] == null)
            pictureList = PictureService.GetInstance().GetPictureList();
        else
            pictureList = PictureService.GetInstance().GetPictureListByCategory(CategoryHelper.CategoryConvert(Request["Category"].ToString()));

        string returnvalue = JsonConvert.SerializeObject(pictureList);
        Response.Write(returnvalue);
    }


}
